package com.czk.yygh.order.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.czk.model.order.OrderInfo;
import com.czk.vo.order.OrderCountQueryVo;
import com.czk.vo.order.OrderQueryVo;

import java.util.Map;

/**
 * @Author:ChenZhangKun
 * @Date: 2021/11/29 15:21
 */
public interface OrderService extends IService<OrderInfo> {
    /**
     * 创建订单
     *
     * @param scheduleId
     * @param patientId
     * @return
     */
    Long saveOrder(String scheduleId, Long patientId);

    /**
     * 通过id获取订单信息
     *
     * @param orderId
     * @return
     */
    OrderInfo getOrders(String orderId);

    /**
     * 订单的分页查询
     *
     * @param pageParams
     * @param orderQueryVo
     * @return
     */
    IPage<OrderInfo> selectPage(Page<OrderInfo> pageParams, OrderQueryVo orderQueryVo);

    /**
     * 取消预约
     *
     * @param orderId
     * @return
     */
    boolean cancelOrder(Long orderId);

    /**
     * 接诊通知
     */
    void patientTips();

    /**
     * 预约统计方法
     *
     * @param orderCountQueryVo
     * @return
     */
    Map<String, Object> getCountMap(OrderCountQueryVo orderCountQueryVo);
}
